home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / Private.a < prev    next >
Encoding:
Text File  |  1993-11-30  |  23.5 KB  |  530 lines  |  [TEXT/MPS ]

  1. ;    File:        Private.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGPRIVATE__') = 'UNDEFINED' THEN
  12. __INCLUDINGPRIVATE__    SET    1
  13.  
  14.  
  15.                   IF          (&TYPE('PrNonPortable') = 'UNDEFINED') THEN
  16. PrNonPortable     EQU         0
  17.                   ENDIF
  18.  
  19.                   IF          PrNonPortable THEN
  20.  
  21.  
  22. ;_______________________________________________________________________
  23. ;
  24. ; System Equates -- These equates supplement the low-level equates for the
  25. ; Macintosh hardware and software defined in SysEqu. These equates are private
  26. ; to Apple Computer, Inc. and should be used solely for building system
  27. ; software.
  28. ;
  29. ;_______________________________________________________________________
  30.  
  31. ;+ Hardware Address Equates (for 512K through 128K Macs)
  32.  
  33. ; Unpacked, user versions of parameter ram
  34.  
  35. SdEnable          EQU         $261                      ; Sound enabled? [byte]
  36.  
  37. ; Event Record Definition
  38.  
  39. evtMax            EQU         $1E                       ; maximum number of events in buffer
  40.  
  41. ; Heap Zone header
  42.  
  43. spare1            EQU         $2C                       ; unused spare [long]
  44.  
  45.  
  46. ; Mouse/Keyboard
  47.  
  48. Tocks             EQU         $173                      ; Lisa sub-tick count [byte]
  49.  
  50. ;Chooser
  51.  
  52. ChooserBits       EQU         $946                      ; bit 7 = 0, don't run; bit 6 = 0, gray out Appletalk
  53.  
  54.  
  55.  
  56. ; Driver Status record definition
  57.  
  58. dsQType           EQU         $A                        ; not used [word]
  59. dsNeedsFlush      EQU         $13                       ; reserved [byte]
  60.  
  61. ;This variable was named RetryCount in SONYEqu
  62.  
  63. SONYRetry         EQU         5
  64. SonyVars          EQU         $134                      ; 3-1/2 disk driver vars [pointer]
  65. DskRtnAdr         EQU         $124                      ; temp for disk driver [pointer]
  66. PollRtnAddr       EQU         $128                      ; 'other' driver locals [pointer]
  67. PWMValue          EQU         $138                      ; current PWM value [word]
  68. PollStack         EQU         $13A                      ; SCC poll data start stack location [pointer]
  69. PollProc          EQU         $13E                      ; SCC poll data procedure [pointer]
  70. DiskVars          EQU         $222                      ; Disk driver variables [62 bytes]
  71.  
  72.  
  73. LastPGlobal       EQU         $954                      ; address of last printer global
  74.  
  75. ; QuickDraw Glue Vectors
  76.  
  77. JHideCursor     EQU         $800
  78. JShowCursor     EQU         $804
  79. JShieldCursor    EQU         $808
  80. JScrnAddr        EQU         $80C
  81. JScrnSize        EQU         $810
  82. JInitCrsr        EQU         $814
  83. JSetCrsr        EQU         $818
  84. JCrsrObscure    EQU         $81C
  85. JUpdateProc     EQU         $820
  86. LGrafJump        EQU         $824
  87. JSwapFont        EQU         $8E0                    ; jump entry for FMSwapFont [long]
  88. JFontInfo        EQU         $8E4                    ; jump entry for FMFontMetrics [long]
  89.  
  90. ; Miscellaneous Globals
  91.  
  92. SysCom            EQU         $100                      ; start of system communication area
  93. DispatchTab       EQU         $400                      ; A-Trap dispatch table [1024 bytes]
  94. OSTable           EQU         $0400                     ; 256 longs, up to $800, where old table of 512 words was
  95. toolDisp          EQU         10                        ; bit #10 distinguishes Tool/OS Get/Set Trap address
  96. oldDisp           EQU         9                         ; bit #9 distinguishes Old/New trap numbering
  97. ; moved HeapStart equate to hwequ file <C1/14Apr86>
  98. ; moved DoEject equate to hwequ file <C1/14Apr86>
  99.  
  100. JShell            EQU         $212                      ; journaling shell state [wprd]
  101. MacJmp            EQU         $120                      ; MACSBUG jumptable [pointer]
  102. MacJmpFlag        EQU            $BFF                    ; MacsBug flag [byte]                    <v1.6>
  103. FileVars          EQU         $340                      ; file system vars [184 bytes]
  104. LoadVars          EQU         $900                      ; loader variables [68 bytes]
  105. LastLGlobal       EQU         $944                      ; address past last loader global
  106. CoreEditVars      EQU         $954                      ; core edit variables [12 bytes]
  107. ScreenVars        EQU         $292                      ; Screen driver variables [8 bytes]
  108. SoundVars         EQU         $262                      ; Sound driver variables [32 bytes]
  109. BootGlobPtr        equ            $DDC                    ; ptr to BootGlobs record at top of memory <2.9><3.2><3.3>
  110.  
  111. ;_______________________________________________________________________
  112. ;
  113. ; Toolbox Equates -- These equates supplement the high-level equates for the
  114. ; Macintosh toolbox software in ToolEqu.a. These equates are private
  115. ; to Apple Computer, Inc. and should be used solely for building system
  116. ; software.
  117. ;
  118. ;_______________________________________________________________________
  119.  
  120. DeskPort          EQU         $9E2                      ; Desk grafPort (Whole screen) [pointer]
  121.  
  122. ;_______________________________________________________________________
  123. ;
  124. ; QuickDraw Equates -- This file supplements the public equates for QuickDraw.
  125. ; found in the file QuickEqu.a These equates are private
  126. ; to Apple Computer, Inc. and should be used solely for building system
  127. ; software.
  128. ;
  129. ;_______________________________________________________________________
  130.  
  131. symbols           EQU         0
  132. forMac            EQU         1
  133.  
  134. ;for Mac+ Only - 2-way comm cmd
  135.  
  136. rDSync            EQU         0                         ; sync up w/each other
  137.  
  138. ; command byte from nub to MPS
  139.  
  140. rDSysErr          EQU         1                         ; system error
  141. rDTrapCall        EQU         2                         ; trap call
  142. rDDta             EQU         3                         ; data comin' down the road
  143.  
  144. ; command byte from MPS to nub
  145.  
  146. rDGetN            EQU         1                         ; GetNBytes
  147. rDSetN            EQU         2                         ; SetNBytes
  148. rDCallProc        EQU         3                         ; CallProc
  149. rDSetAtrap        EQU         4                         ; SetATrap
  150. rDResume          EQU         5                         ; Resume execution
  151.  
  152. ; end Mac+ only
  153.  
  154.  
  155. FlEvtMask         EQU         $25E                      ; (word) mask of allowable events to flush at FlushEvents.
  156. TrapAgain         EQU         $B00                      ; use 4 bytes here for another trap
  157. PWMBuf1           EQU         $B0A                      ; (long) PWM buffer ptr
  158. BootMask          EQU         $B0E                      ; (word) needed during boot
  159. AtalkHk1          EQU         $B14                      ; (long) Appletalk hook
  160. AtalkHk2          EQU         $B18                      ; (long) Appletalk hook
  161. UnSwitchedFlags    equ            $B20                    ; (byte) special flags, not switched by multifinder <3.3>
  162. usRelTaskRun    equ            7                        ;        bit 7=1 if Reliability Mgr mtbf task NOT installed <3.3>
  163. SwitchedFlags    equ            $B21                    ; (byte) special flags, switched by multifinder        <3.3>
  164. SCSIFlag          EQU         $B22                      ; (word) Configuration Flag for SCSI
  165. HWCfgFlags        EQU         SCSIFlag                  ; (word) HW Configuration flags
  166. ; bit 15 - SCSI port present
  167. ; bit 14 - New Clock Chip Present
  168. ; bit 13 - Extra Parameter Ram Valid at boottime.
  169.  
  170. BtDskRfn          EQU         $B34                      ; (word) refnum for boot drive driver refnum
  171. BootTmp8          EQU         $B36                      ; (8bytes) temp space needed by StartBoot
  172. T1Arbitrate       EQU         $B3F                      ; (byte) $FF if Timer T1 up for grabs.
  173. RMGRHiVars        EQU         $B80                      ; $B80-$BFF are switched vars
  174. ; RMGR vars extend $B80 through $B9F
  175.  
  176. NewUnused         EQU         $BC0                      ; (word) - used to be FlEvtMask
  177. FmtDefaults       EQU         52+$36A                   ; ptr to formatting defs (TFSVars + 52) [long]
  178.  
  179. ; addresses of TE hooks installed in trap table
  180.  
  181. TETrimMeasure     EQU         (4*253+OSTable)           ; trimMeasure hook
  182. TEFindLine        EQU         (4*255+OSTable)           ; findLine hook
  183. JBlockMove        EQU         $4B8                      ; Special equate for OUR HeapGuts Jump Table
  184. JInsTime          EQU         (600-512)*4+OSTable       ;
  185. JRmvTime          EQU         (601-512)*4+OSTable       ;
  186. JPrimeTime        EQU         (602-512)*4+OSTable       ;
  187. JADBop            EQU            ($7C*4)+OSTable            ; OS trap table entry for _ADBop
  188. JIOPMsgRequest    EQU            ($87*4)+OSTable            ; OS trap table entry for _IOPMsgRequest
  189. JLg2Phys          EQU         (703-512)*4+OSTable       ;
  190. JFlushCache       EQU         (704-512)*4+OSTable       ;
  191. JGetBlock         EQU         (705-512)*4+OSTable       ;
  192. JMarkBlock        EQU         (706-512)*4+OSTable       ;
  193. JRelBlock         EQU         (707-512)*4+OSTable       ;
  194. JTrashBlocks      EQU         (708-512)*4+OSTable       ;
  195. JTrashVBlks       EQU         (709-512)*4+OSTable       ;
  196. JCacheWrIP        EQU         (710-512)*4+OSTable       ;
  197. JCacheRdIP        EQU         (711-512)*4+OSTable       ;
  198.  
  199.  
  200. JBasicIO          EQU         (712-512)*4+OSTable       ;
  201. JRdBlocks         EQU         (713-512)*4+OSTable       ;
  202. JWrBlocks         EQU         (714-512)*4+OSTable       ;
  203. JSetUpTags        EQU         (715-512)*4+OSTable       ;
  204. JBTClose          EQU         (716-512)*4+OSTable       ;
  205. JBTDelete         EQU         (717-512)*4+OSTable       ;
  206. JBTFlush          EQU         (718-512)*4+OSTable       ;
  207. JBTGetRecord      EQU         (719-512)*4+OSTable       ;
  208. JBTInsert         EQU         (720-512)*4+OSTable       ;
  209. JBTOpen           EQU         (721-512)*4+OSTable       ;
  210. JBTSearch         EQU         (722-512)*4+OSTable       ;
  211. JBTUpdate         EQU         (723-512)*4+OSTable       ;
  212. JGetNode          EQU         (724-512)*4+OSTable       ;
  213. JRelNode          EQU         (725-512)*4+OSTable       ;
  214. JAllocNode        EQU         (726-512)*4+OSTable       ;
  215. JFreeNode         EQU         (727-512)*4+OSTable       ;
  216. JExtBTFile        EQU         (728-512)*4+OSTable       ;
  217. JDeallocFile      EQU         (729-512)*4+OSTable       ;
  218. JExtendFile       EQU         (730-512)*4+OSTable       ;
  219. JTruncateFile     EQU         (731-512)*4+OSTable       ;
  220. JCMSetUp          EQU         (732-512)*4+OSTable       ;
  221. JDtrmV1           EQU         (734-512)*4+OSTable       ;
  222. JBlkAlloc         EQU         (735-512)*4+OSTable       ;
  223. JBlkDeAlloc       EQU         (736-512)*4+OSTable       ;
  224. JFileOpen         EQU         (737-512)*4+OSTable       ;
  225. JPermssnChk       EQU         (738-512)*4+OSTable       ;
  226. JFndFilName       EQU         (739-512)*4+OSTable       ;
  227. JRfNCall          EQU         (740-512)*4+OSTable       ;
  228. JAdjEOF           EQU         (741-512)*4+OSTable       ;
  229.  
  230. JFileClose        EQU            (745-512)*4+OSTable        ; $7a4    <dnf v2.6>
  231. JFileRead        EQU            (746-512)*4+OSTable        ; $7a8    <dnf v2.6>
  232. JFileWrite        EQU            (747-512)*4+OSTable        ; $7ac    <dnf v2.6>
  233.  
  234. JClkNoMem         EQU         (595-512)*4+OSTable       ;vector for clock
  235.  
  236.  
  237. JSegStack         EQU         (760-512)*4+OSTable       ;vector for segment loader
  238.  
  239. ; vectors for RMGR low levels routines
  240. JSuperLoad        EQU         (761-512)*4+OSTable       ;
  241. JCmpFrm           EQU         (762-512)*4+OSTable       ;
  242. JNewMap           EQU         (763-512)*4+OSTable       ;
  243. JCheckLoad        EQU         (764-512)*4+OSTable       ;
  244.  
  245. JRMgrStdEntry    EQU            ($A6*4)+OSTable            ;vector for standard entry routine
  246. JRMgrStdExit    EQU            ($A7*4)+OSTable            ;vector for standard exit routine
  247.  
  248.  
  249. ;_______________________________________________________________________
  250. ;
  251. ; heap flags
  252.  
  253. checking          EQU         0                         ;check arguments and data structures
  254. statistics        EQU         0                         ;gather statistics on usage
  255. robust            EQU         0                         ;enables super-robust internal checks
  256. countMPs          EQU         0                         ;enables counting of master pointers
  257. dfltFlags         EQU         0                         ;Checking is on when zone is init'd
  258. nOSTable          EQU         $0400                     ; 256 longs, up to $800
  259. JMtCheck          EQU         ($AF)*4+nOSTable          ; ($A0AF) $0400 is n/OSTable
  260. JCheckReMount     EQU         ($B0)*4+nOSTable          ; ($A0B0) $0400 is n/OSTable
  261. JDtrmV2           EQU         ($B1)*4+nOSTable          ; ($A0B1) $0400 is n/OSTable
  262. JFindDrive        EQU         ($B2)*4+nOSTable          ; ($A0B2) $0400 is n/OSTable
  263. JFClose           EQU         ($B3)*4+nOSTable          ; ($A0B3) $0400 is n/OSTable
  264. JFlushMDB         EQU         ($B4)*4+nOSTable          ; ($A0B4) $0400 is n/OSTable
  265. JGoDriver         EQU         ($B5)*4+nOSTable          ; ($A0B5) $0400 is n/OSTable
  266. JWaitUntil        EQU         ($B6)*4+nOSTable          ; ($A0B6) $0400 is n/OSTable
  267. JSyncWait         EQU         ($B7)*4+nOSTable          ; ($A0B7) $0400 is n/OSTable
  268. JSoundDead        EQU         ($B8)*4+nOSTable          ; ($A0B8) $0400 is n/OSTable
  269. JDisptch          EQU         ($B9)*4+nOSTable          ; ($A0B9) $0400 is n/OSTable
  270. ;JStartinit EQU ($B9)*4+nOSTable ; ($A0B9) $0400 is n/OSTable <C681><C811>
  271. JIAZInit          EQU         ($BA)*4+nOSTable          ; ($A0BA) $0400 is n/OSTable
  272. JIAZPostInit      EQU         ($BB)*4+nOSTable          ; ($A0BB) $0400 is n/OSTable
  273. JLaunchInit       EQU         ($BC)*4+nOSTable          ; ($A0BC) $0400 is n/OSTable
  274. JCacheFlush       EQU         ($BD)*4+nOSTable          ; ($A0BD) $0400 is n/OSTable
  275. JStripAddress    EQU            ($55)*4+nOSTable        ; ($A055) $0400 is n/OSTable        <v1.7>
  276. JjSwapMMU        EQU            ($5D)*4+nOSTable        ; ($A05D) $0400 is n/OSTable        <v2.1>
  277. JTranslate24to32 EQU        ($91)*4+nOSTable        ; ($A091) $0400 is n/OSTable        <v3.4>
  278. XToolTable        EQU            ($99)*4+nOSTable        ; ($A099) $0400 is n/OSTable        <11>
  279.  
  280. ;_______________________________________________________________________
  281. ;
  282. ; addresses of TE hooks installed in trap table for new color text edit <C144>
  283.  
  284. JPixel2Char       EQU         (742-512)*4+nOSTable      ; ($A0E6) $0400 is nOSTable
  285. JChar2Pixel       EQU         (743-512)*4+nOSTable      ; ($A0E7) $0400 is nOSTable
  286. JHiliteText       EQU         (744-512)*4+nOSTable      ; ($A0E8) $0400 is nOSTable
  287.  
  288. ;_______________________________________________________________________
  289. ;
  290. ;tfs vectors <A281>
  291.  
  292. JUpdAltMDB      EQU         ($ED)*4+nOSTable          ; ($A0ED) $0400 is n/OSTable
  293. JCkExtFS          EQU         ($EE)*4+nOSTable          ; ($A0EE) $0400 is n/OSTable
  294. JDTrmV3           EQU         ($EF)*4+nOSTable          ; ($A0EF) $0400 is n/OSTable
  295. JBMChk            EQU         ($F0)*4+nOSTable          ; ($A0F0) $0400 is n/OSTable
  296. JTstMod           EQU         ($F1)*4+nOSTable          ; ($A0F1) $0400 is n/OSTable
  297. JLocCRec          EQU         ($F2)*4+nOSTable          ; ($A0F2) $0400 is n/OSTable
  298. JTreeSearch       EQU         ($F3)*4+nOSTable          ; ($A0F3) $0400 is n/OSTable
  299. JMapFBlock        EQU         ($F4)*4+nOSTable          ; ($A0F4) $0400 is n/OSTable
  300. JXFSearch         EQU         ($F5)*4+nOSTable          ; ($A0F5) $0400 is n/OSTable
  301. JReadBM           EQU         ($F6)*4+nOSTable          ; ($A0F6) $0400 is n/OSTable
  302.  
  303. bcMask            EQU         $00FFFFFF                 ; Mask for the 24 bit Byte Count
  304. GrafBegin         EQU         $800                      ; graf global area
  305. GrafEnd           EQU         $8F2                      ; end of graphics globals
  306.  
  307.                   ENDIF                                 ;end exclusion of private information
  308.  
  309. ; Offsets into boot blocks
  310.  
  311. bbID              EQU         0                         ; (word) offset to boot blocks ID
  312. bbEntry           EQU         2                         ; (contains BRA.S) entrypoint to boot blocks
  313. bbVersion         EQU         6                         ; (word) version number
  314. bbPageFlags       EQU         8                         ; (word) page 2 usage flags
  315. bbSysName         EQU         $0A                       ; system resource code file name (byte length + 0-15 chars)
  316. bbShellName       EQU         $1A                       ; system shell file name ('Finder')
  317. bbDbg1Name        EQU         $2A                       ; debugger file name (first load)
  318. bbDbg2Name        EQU         $3A                       ; debugger file name (second load)
  319. bbScreenName      EQU         $4A                       ; boot screen file name
  320. bbHelloName       EQU         $5A                       ; startup program file name
  321. bbScrapName       EQU         $6A                       ; system scrap file name
  322. bbCntFCBs         EQU         $7A                       ; (word) # of FCBs to allocate (determines max open files)
  323. bbCntEvts         EQU         $7C                       ; (word) # of event queue elements to allocate
  324. bb128KSHeap       EQU         $7E                       ; size of system heap on a 128K Mac (no longer used)
  325. bb256KSHeap       EQU         $82                       ; size of system heap on a 256K Mac (no longer used)
  326. bb512KSHeap       EQU         $86                       ; size of system heap on a 512K Mac
  327. bbSysHeapSize     EQU         $86                       ; (long) absolute size of the system heap (for all machines).
  328. ; (word) unused - reserved
  329. bbSysHeapExtra    EQU         $8C                       ; (long) minimum additional system heap space required.
  330. bbSysHeapFract    EQU         $90                       ; (long) fraction of memory available to be used for sys heap.
  331.  
  332.  
  333. ; The version number of the boot blocks affects the interpretation of the system heap size:
  334. ;
  335. ; if (BBVersion) <= BBOldVers then
  336. ; System heap size becomes DefSysHeapSize (see HWEqu).
  337. ;
  338. ; if BBOldVers < (BBVersion) < BBNewVers then
  339. ; if (BBVersion) = execBBvers then
  340. ; Executes boot blocks starting at BBEntry.
  341. ; System heap size becomes (BBSysHeapSize) (if it isn't already bigger).
  342. ;
  343. ; if BBNewBit is set in (BBVersion) then
  344. ; if BBExecBit is set then
  345. ; Executes boot blocks starting at BBEntry.
  346. ; if BBRelBit is cleared then
  347. ; System heap size becomes (BBSysHeapSize) (if it isn't already bigger)
  348. ; if BBRelBit is set then
  349. ; System heap is extended by BBSysHeapExtra + (BBSysHeapFract * (MemTop))
  350.  
  351. ; Values for boot blocks.
  352. bbOldVers         EQU         $14                       ; really old versions of boot blocks are <= this
  353. bbOldExecVers     EQU         'D'                       ; old version for executable boot blocks
  354.  
  355. ; Bits for new boot blocks:
  356. bbNewBit          EQU         7                         ; set to indicate the use of the new format
  357. bbExecBit         EQU         6                         ; set to indicate dispatchable boot blocks
  358. bbRelBit          EQU         5                         ; set to indicate relative heap size specification
  359. ; bits 4 through 0 are reserved for future use by Apple and must be cleared.
  360.  
  361. ; Corresponding values
  362. bbNewMask         EQU         $80                       ; new boot blocks use #'s >= this
  363. bbExecMask        EQU         $40                       ;
  364. bbRelMask         EQU         $20                       ;
  365.  
  366. ;----------------------------------------------
  367. ; Power Manager Data Structures
  368.  
  369. pmCommand         EQU         0                         ;Power manager parameter block
  370. pmLength          EQU         pmCommand+2               ;Power manager parameter block
  371. pmSBuffer         EQU         pmLength+2                ;Power manager parameter block
  372. pmRBuffer         EQU         pmSBuffer+4               ;Power manager parameter block
  373. pmData            EQU            pmRBuffer+4
  374. pmBlkSize        EQU            pmData+4
  375.  
  376. ; Power Manager Commands
  377.  
  378. powerCntl         EQU         $10               ;Power Manager parameter block - Power/clock control
  379. powerRead         EQU         $18               ;Power Manager parameter block - Power/clock control
  380. pMgrADB           EQU         $20               ;Power Manager parameter block - Apple Desktop Bus
  381. pMgrADBoff       EQU         $21               ;Power Manager parameter block - Apple Desktop Bus
  382. readADB           EQU         $28               ;Power Manager parameter block - Apple Desktop Bus
  383. pMgrADBInt        EQU         $2F               ;Power Manager parameter block - Apple Desktop Bus
  384. timeWrite         EQU         $30               ;Power Manager parameter block - Clock/parameter ram
  385. pramWrite         EQU         $31               ;Power Manager parameter block - Clock/parameter ram
  386. xPramWrite        EQU         $32               ;Power Manager parameter block - Clock/parameter ram
  387. timeRead          EQU         $38               ;Power Manager parameter block - Clock/parameter ram
  388. pramRead          EQU         $39               ;Power Manager parameter block - Clock/parameter ram
  389. xPramRead         EQU         $3A               ;Power Manager parameter block - Clock/parameter ram
  390. contrast          EQU         $40               ;Power Manager parameter block - Screen contrast control
  391. modemSet          EQU         $50               ;Power Manager parameter block - Internal modem setup
  392. modemRead          EQU         $58               ;Power Manager parameter block - Internal modem setup
  393. batteryRead       EQU         $68               ;Power Manager parameter block - Battery/charger level and status
  394. batteryNow       EQU         $69               ;Power Manager parameter block - Battery/charger instantaneous level and status
  395. SetOneSecInt    EQU            $70                ;Power Manager parameter block - set one-second interrupt        <t3> djw
  396. PmgrPWRoff      EQU         $7E               ;Power Manager parameter block - Power off
  397. sleepReq          EQU         $7F               ;Power Manager parameter block - Sleep request
  398. readINT           EQU         $78               ;Power Manager parameter block - Read power manager interrupt flag register
  399. sleepAck          EQU         $70               ;Power Manager parameter block - Sleep acknowledge
  400. timerSet          EQU         $80               ;Power Manager parameter block - Wake Up Timer
  401. timerRead          EQU         $88               ;Power Manager parameter block - Wake Up Timer
  402. soundSet        EQU            $90               ;Power Manager parameter block - Sound power control
  403. SetDFAC            EQU            $91               ;Power Manager parameter block - Set DFAC register
  404. soundRead        EQU            $98               ;Power Manager parameter block - Sound power state
  405. ReadDFAC        EQU            $99               ;Power Manager parameter block - Read DFAC register
  406. resetCPU        EQU            $D0               ;Power Manager parameter block - Reset the CPU
  407. readAtoD          EQU         $D8               ;Power Manager parameter block - Read A/D channel
  408. writePmgrRAM    EQU            $E0               ;Power Manager paramater block - Write to internal PMgr Ram
  409. readPmgrRAM        EQU            $E8               ;Power Manager parameter block - Read the internal PMgr Ram
  410. readPmgrVers    EQU            $EA                   ;Power Manager parameter block - Read the power manager version number
  411. PmgrSelfTest    EQU            $EC               ;Power Manager parameter block - Power Manager Self Test
  412. PmgrSoftReset    EQU            $EF               ;Power Manager parameter block - Soft Reset of the Power Manager
  413. sleepSig        EQU            'MATT'            ;Sleep signature word
  414.  
  415.  
  416. ;Power control/clock equates (command $10)
  417.  
  418. iwmOn             EQU         $81                       ;Disk controller clock
  419. iwmOff            EQU         $01                       ;Disk controller clock
  420. sccOn             EQU         $82                       ;SCC chip clock
  421. sccOff            EQU         $02                       ;SCC chip clock
  422. hdOn             EQU         $84                       ;Hard disk power
  423. hdOff            EQU         $04                       ;Hard disk power
  424. modemOn         EQU         $88                       ;Internal modem power
  425. modemOff        EQU         $08                       ;Internal modem power
  426. serOn             EQU         $90                       ;Serial output drivers power
  427. serOFF            EQU         $10                       ;Serial output drivers power
  428. sndLtchClear      EQU         $A0                       ;Sound latch clear
  429. sndLtchRelease     EQU         $20                       ;Sound latch release
  430. minus5on          EQU         $C0                       ;Minus 5 volts power
  431. minus5off         EQU         $40                       ;Minus 5 volts power
  432. ascOn             EQU         $A0                       ;Sound chip clock and analog power
  433. ascOff            EQU         $20                       ;Sound chip clock and analog power
  434. alloff            EQU            $5B                       ;Turn off everything except hard disk, sound latch ready
  435. soundOff        EQU            $00                           ;Sound power off
  436. soundOn            EQU            $02                           ;Sound power on
  437. sndClrLtch        EQU            $02                           ;Sound power on, clear sound power latch
  438. sndOnClrLtch    EQU            $03                       ;Sound power on, clear sound power latch
  439.  
  440.  
  441. ;Interrupt flag register usage (command $78)
  442.  
  443. adbIntFlag        EQU         0                         ;ADB data ready
  444. batIntFlag        EQU         1                         ;Low BATtery power
  445. envIntFlag        EQU         2                         ;ENVironmental problem
  446.  
  447. ;Batter/Charger status bits
  448.  
  449. HasCharger        EQU            0                        ;Charger connected
  450. ShortedBat        EQU            2                        ;Shorted battery condition
  451. LowBattery        EQU            4                        ;Low battery condition
  452. ChrgState        EQU            5                        ;Charger connection state change
  453. OverTemp        EQU            6                        ;High temperature condition
  454.  
  455. ;Modem command bits                                    ;
  456.  
  457. ModemPwr        EQU            0                        ;Modem power control (1=true)
  458. ModemAorB        EQU            1                        ;Modem connection to port A or B (1=A)
  459. RingWakeEnable    EQU            2                        ;Modem ring detect wake up enable (1=true)
  460. ModemInstalled    EQU            3                        ;Modem in the slot (1=true)
  461. RingDetect        EQU            4                        ;Modem ring detect pin (1=ringing)
  462. ModemHook        EQU            5                        ;Modem on/off hook (1=off hook)
  463.  
  464. ;SerialPower bits and bytes
  465. BypassModem        EQU            0                        ;Ignore pram internal modem designation (1=ignore)
  466. PortAorB        EQU            2                        ;Port A or Port B (1=port A)
  467. SerialOff        EQU            7                        ;Power on/off selector bit
  468.  
  469. PortAPower        EQU            4                        ;Power port A command (byte version of PortAorB)
  470. PortBPower        EQU            0                        ;Power port B command
  471.  
  472. ;Power manager loopcounts
  473. wait8us           EQU         $40                       ;For software loop, remove later
  474. BootDevTicks    EQU            2*60*60                    ; Wait for boot device before sleep, in ticks.
  475.  
  476.  
  477. ; equates for dynamic menuList structure
  478. ;
  479. ;----- Part 1 -- regular menus
  480. mbResID           EQU         4                         ; menuBar variant offset in menuList [word]
  481. menu1Size         EQU         mbResID + 2               ; Must be = 6 forever!!!
  482.  
  483. ;----- Part 2 -- hierarchical menus
  484. lastHMenu         EQU         0                         ; offset in HMenu part of dynamic menuList [word]
  485. menuTitleSave     EQU         lastHMenu + 2             ; handle to saved bits behind title rectangle [handle]
  486. menu2Size         EQU         menuTitleSave+4           ; size of HMenu entry
  487. menuHoH           EQU         0                         ; hierarchical menu [handle]
  488.  
  489. ;----- Size of menuList at InitMenus time -- no menus, no hierarchical menus
  490. initMListSize     EQU         menu1Size + menu2Size
  491. ; equates for mbarproc's save structure created when it receives Init Msg (Msg #3)
  492. ;
  493. ;----- Header
  494. lastMBSave        EQU         0                         ; offset to last menu saved in structure [word]
  495. mbCustomStorage   EQU         lastMBSave + 2            ; private storage for custom mbarproc's [handle]
  496. mbItemRect        EQU         mbCustomStorage + 4       ; rect of currently chosen menu item [rect]
  497. mbMenuDelay       EQU         mbItemRect + 8            ; get MenuDelay from paramram and store here [byte]
  498. mbMenuDrag        EQU         mbMenuDelay + 1           ; get MenuDrag from paramram and store here [byte]
  499. mbUglyScroll      EQU         mbMenuDrag + 1            ; flag to tell whether HMenu has been brought [word]
  500. ; before scrolling happens
  501. mbIconState       EQU         mbUglyScroll + 2          ; Place to save NMgr icon state
  502. mbHeader          EQU         mbIconState + 2           ; size of mb save header [$14]
  503. ; !!!!! CAUTION: mbHeader MUST be smaller than mbEntrySize !!!!!
  504.  
  505. ;----- Entry
  506. mbRectSave        EQU         0                         ; rectangle of menu on screen [8 bytes]
  507. mbBitsSave        EQU         mbRectSave + 8            ; handle to saved bits behind menu rectangle
  508. mbMenuDir         EQU         mbBitsSave + 4            ; direction menu was placed on screen,
  509. ; to right or left of title (if first menu) 
  510. ; or previous menu (if hierarchical menu)
  511. mbMLOffset        EQU         mbMenuDir + 2             ; 6 byte offset of menu in menuList [word]
  512. mbMLHandle        EQU         mbMLOffset + 2            ; handle of menu in menuList
  513. mbTopScroll       EQU         mbMLHandle + 4            ; top scrolled to menu item, from global topMenuItem [word]
  514. mbBotScroll       EQU         mbTopScroll + 2           ; bottom scrolled to menu item, from global atMenuBottom [word]
  515. mbReserved        EQU         mbBotScroll + 2           ; reserved field [long]
  516. mbEntrySize       EQU         mbReserved + 4
  517. mbSaveSize        EQU         mbEntrySize*6             ; x-byte header and 5 entries of x-bytes each
  518. firstAltMenuCmd   EQU         $1B
  519. altMenuCmd1       EQU         $1D                       ; itemCmd == $1D ==> unused indicator reserved for future Apple use
  520. altMenuCmd2       EQU         $1E                       ; itemCmd == $1E ==> unused indicator reserved for future Apple use
  521. altMenuCmd3       EQU         $1F                       ; itemCmd == $1F ==> unused indicator reserved for future Apple use
  522. lastAltMenuCmd    EQU         $1F
  523. mbRightDir        EQU         0                         ; menu went to the right (direction)
  524. mbLeftDir         EQU         1                         ; menu went to the left (direction)
  525. menuDelay         EQU         $7E                       ; param ram locations for user settable
  526. menuDrag          EQU         $7F                       ; hierarchical menu delay and drag ticks
  527.  
  528.  
  529.     ENDIF    ; ...already included 
  530.